package com.jiutong.dao.impl;

import com.jiutong.dao.BaseDao;
import com.jiutong.dao.ProductDao;
import com.jiutong.pojo.Product;
import org.springframework.stereotype.Repository;

/**
 * Created by sty on 2017/2/22.
 */
//@Repository
public class ProductDaoImpl extends BaseDao implements ProductDao {
    @Override
    public Product findById(int id) {
        return getSqlSessionTemplate9tong().selectOne("Product.findById",id);
    }

    @Override
    public int save(Product product) {
        return getSqlSessionTemplate9tong().update("Product.save",product);
    }
}
